<?php

namespace App\Rules;

class AnchorWorksValidate extends BaseValidate
{
    //验证规则
    protected $rule = [
        'anchor_id' => 'required',
        'anchor_type_id' => 'required',
        'created_at' => 'required|date'
    ];
    //自定义验证信息
    protected $message = [
        'anchor_id.required' => '达人名称不能为空',
        'anchor_type_id.required' => '请选择类型',
        'created_at.required' => '开始时间不能为空',
        'created_at.date' => '开始时间不对',
    ];

    //自定义场景
    protected $scene = [
//        'add' => "title,content",
        'edit' => ['anchor_id', 'anchor_type_id'],
    ];
}
